package com.token.controller;

import com.token.common.ResultMessage;
import com.token.service.TransactionService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @auther: henriy
 * @Date: 2024/2/22
 */
@Api(tags = "编程式事务案例")
@RestController
@RequestMapping("/transaction")
public class TransactionController {
    @Resource
    private TransactionService transactionService;

    @PostMapping("/add")
    public ResultMessage addTransaction(){
        transactionService.addTransaction();
        return ResultMessage.isOk();
    }


}
